<nz-modal
[nzVisible]="visible"
[nzTitle]="detail ? '编辑发货地址' : '新增发货地址'"
[nzFooter]="null"
[nzClosable]="true"
nzWidth="580"
(nzOnCancel)="onCancel()"
[nzMaskClosable]="false">
  <div>
    <form nz-form [formGroup]="shipAddressForm" (ngSubmit)="onSubmit($event)" nzLayout="horizontal">
      <nz-form-item  nzFlex>
          <nz-form-label [nzSpan]="6" nzFor="name">Name</nz-form-label>
          <nz-form-control [nzSpan]="14">
            <input nz-input formControlName="name" type="text" id="name">
            <nz-form-explain *ngIf="shipAddressForm.get('name').dirty && shipAddressForm.get('name').errors">请输入地址名称</nz-form-explain>
          </nz-form-control>
      </nz-form-item>
      <nz-form-item  nzFlex>
          <nz-form-label [nzSpan]="6" nzFor="country">Country</nz-form-label>
          <nz-form-control [nzSpan]="14">
            <input nz-input formControlName="country" type="text" id="country">
          </nz-form-control>
      </nz-form-item>
      <nz-form-item  nzFlex>
          <nz-form-label [nzSpan]="6" nzFor="province">Province</nz-form-label>
          <nz-form-control [nzSpan]="14">
            <input nz-input formControlName="province" type="text" id="province">
          </nz-form-control>
      </nz-form-item>
      <nz-form-item  nzFlex>
          <nz-form-label [nzSpan]="6" nzFor="city">City</nz-form-label>
          <nz-form-control [nzSpan]="14">
            <input nz-input formControlName="city" type="text" id="city">
          </nz-form-control>
      </nz-form-item>
      <nz-form-item  nzFlex>
          <nz-form-label [nzSpan]="6" nzFor="addr">Address</nz-form-label>
          <nz-form-control [nzSpan]="14">
            <textarea [nzAutosize]="{ minRows: 2, maxRows: 6 }" row="4" formControlName="addr" id="addr" nz-input></textarea>
          </nz-form-control>
      </nz-form-item>
      <nz-form-item  nzFlex>
          <nz-form-label [nzSpan]="6" nzFor="post_code">Post Code</nz-form-label>
          <nz-form-control [nzSpan]="14">
            <input nz-input formControlName="post_code" type="text" id="post_code">
          </nz-form-control>
      </nz-form-item>
      <nz-form-item  nzFlex>
          <nz-form-label [nzSpan]="6" nzFor="tel">Tel</nz-form-label>
          <nz-form-control [nzSpan]="14">
            <input nz-input formControlName="tel" type="text" id="tel">
          </nz-form-control>
      </nz-form-item>
      <nz-form-item  nzFlex>
          <nz-form-control nzOffset="6" [nzSpan]="14">
            <button type="submit" nzSize="large" nz-button nzType="primary">保存</button>
          </nz-form-control>
      </nz-form-item>
    </form>
  </div>
</nz-modal>

